package com.yx.robot.bean.robot;

import java.util.Arrays;
import java.util.List;

/**
 * 勿扰
 * 开始时间和结束时间以秒存储
 * 例 8点23分 =  8 * 3600 + 23*60 = 503
 */
public class QuietHour implements Clear {
    private boolean enable;
    private int startTime;
    private int endTime;
    private List<Integer> repeat;

    public QuietHour() {
        repeat = Arrays.asList(0, 1, 2, 3, 4, 5, 6);
    }

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    public int getStartTime() {
        return startTime;
    }

    public void setStartTime(int startTime) {
        this.startTime = startTime;
    }

    public int getEndTime() {
        return endTime;
    }

    public void setEndTime(int endTime) {
        this.endTime = endTime;
    }

    public List<Integer> getRepeat() {
        return repeat;
    }

    public void setRepeat(List<Integer> repeat) {
        this.repeat = repeat;
    }

    @Override
    public void clear() {
        enable = false;
        startTime = 0;
        endTime = 0;
        repeat = Arrays.asList(0, 1, 2, 3, 4, 5, 6);
    }
}
